﻿package com.wandian.controller
{
	import com.wandian.data.GameData;
	import com.wandian.model.AccountProxy;
	import com.wandian.model.RankProxy;
	import com.wandian.model.ShopProxy;
	import com.wandian.model.socket.ServerPacketProxy;
	import com.wandian.model.vo.PlayerVo;
	import com.wandian.model.vo.RoomVo;
	import com.wandian.view.mediator.GameRoomMediator;
	import com.wandian.view.mediator.MaskGameMediator;
	import com.wandian.view.mediator.RankMediator;
	import com.wandian.view.mediator.account.AccountMediator;
	import com.wandian.view.mediator.bank.BankMediator;
	import com.wandian.view.mediator.shop.ShopMediator;
	
	import flash.display.MovieClip;
	
	import org.puremvc.as3.interfaces.*;
	import org.puremvc.as3.patterns.command.*;

    public class RankCommand extends SimpleCommand
    {
        private var _global:GameData;
        private var _mcPanel:MovieClip;

        public function RankCommand()
        {
            this._global = GameData.getInstance();
            return;
        }

        override public function execute(notification:INotification) : void
        {
            super.execute(notification);
            var _loc_2:* = facade.retrieveProxy(RankProxy.NAME) as RankProxy;
            switch(notification.getName())
            {
                case CLZNoticeName.SHOW_RANK:
                {
                    this.showPanel();
                    break;
                }
                case CLZNoticeName.RANK_TOP_REQ:
                {
					trace("[RankCommand.RANK_TOP_REQ]排行榜被调用")
//                    _loc_2.requestRankByType(param1.getBody() as int);
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }

        private function showPanel() : void
        {
			//--隐藏排行榜
			return;
            if (!this._mcPanel)
            {
                this._mcPanel = GameData.getMovieClip("RankPanel");
            }
            if (!Texas.I._mcTableView.contains(this._mcPanel))
            {
                Texas.I._mcTableView.addChild(this._mcPanel);
            }
            this._mcPanel.x = 0;
            this._mcPanel.y = 630;
            facade.registerMediator(new RankMediator(this._mcPanel));
            return;
        }

    }
}
